package czy.demo.repository;

import czy.demo.pojo.Person;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Component;

@Component
public interface PersonRepository extends MongoRepository<Person,Integer> {

    /* MongoDB支持关键字作为方法名的查询 */
    Person findByName(String name);

}
